package com.zzedu.dto;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 通知消息对象 zz_message
 * 
 * @author Mr.Wang
 * @date 2025-03-15
 */
public class ZzMessageDTO implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** id */

    private Long id;
    /** 消息类型 0-系统消息,1-课程到期通知 2-作业批改通知 */
    private Integer noticeType;
    /** 消息标题 */
    private String title;
    /** 消息内容 */
    private String content;
    /** 消息发送人 */
    private Long sendUserId;
    /** 消息发送人类型 */
    private Integer sendUserType;
    /** 消息接收人 */
    private Long acceptUserId;
    /** 消息接收人类型 */
    private Integer acceptUserType;
    /** 消息发送时间 */

    private LocalDateTime sendTime;
    /** 是否阅读 */
    private Integer readFlag;
    /** 消息阅读时间 */

    private LocalDateTime readTime;
    /** 逻辑删除(0：未删除 1：id) */
    private Integer deleted;
    /** 创建人 */
    private Long createBy;
    /** 修改人 */
    private Long updateBy;
    private Map<String, Object> params;
    /**
     * 当前记录起始索引
     */
    private Long pageNum = 1l;

    /**
     * 每页显示记录数
     */
    private Long pageSize = 20l;

    /**
     * 排序列
     */
    private String orderByColumn;

    /**
     * 排序的方向desc或者asc
     */
    private String isAsc = "asc";

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setNoticeType(Integer noticeType) 
    {
        this.noticeType = noticeType;
    }

    public Integer getNoticeType() 
    {
        return noticeType;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setSendUserId(Long sendUserId) 
    {
        this.sendUserId = sendUserId;
    }

    public Long getSendUserId() 
    {
        return sendUserId;
    }
    public void setSendUserType(Integer sendUserType) 
    {
        this.sendUserType = sendUserType;
    }

    public Integer getSendUserType() 
    {
        return sendUserType;
    }
    public void setAcceptUserId(Long acceptUserId) 
    {
        this.acceptUserId = acceptUserId;
    }

    public Long getAcceptUserId() 
    {
        return acceptUserId;
    }
    public void setAcceptUserType(Integer acceptUserType) 
    {
        this.acceptUserType = acceptUserType;
    }

    public Integer getAcceptUserType() 
    {
        return acceptUserType;
    }
    public void setSendTime(LocalDateTime sendTime) 
    {
        this.sendTime = sendTime;
    }

    public LocalDateTime getSendTime() 
    {
        return sendTime;
    }
    public void setReadFlag(Integer readFlag) 
    {
        this.readFlag = readFlag;
    }

    public Integer getReadFlag() 
    {
        return readFlag;
    }
    public void setReadTime(LocalDateTime readTime) 
    {
        this.readTime = readTime;
    }

    public LocalDateTime getReadTime() 
    {
        return readTime;
    }
    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }
    public void setCreateBy(Long createBy) 
    {
        this.createBy = createBy;
    }

    public Long getCreateBy() 
    {
        return createBy;
    }
    public void setUpdateBy(Long updateBy) 
    {
        this.updateBy = updateBy;
    }

    public Long getUpdateBy() 
    {
        return updateBy;
    }


    public Long getPageNum() {
        return pageNum;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc() {
        return isAsc;
    }

    public void setIsAsc(String isAsc) {
        this.isAsc = isAsc;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public IPage getPageDTO() {
        return PageDTO.of(getPageNum(), getPageSize());
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
